package uno.net;

import java.io.Serializable;

/**
 * Mi serve sapere solo l'ultima carta giocata dal giocatore
 * e la dimensione attuale del mazzo. Un giocatore puo' anche decidere
 * di non giocare. Vi e' il caso in cui e' impossibilitato a farlo( non
 * possiede carte giocabili) quindi la carta giocata puo' assumere valore
 * null.
 * */
public class UnoPlay implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8400297031742091765L;
	
	private int Id;
	private String cardPlayed;
	private int actualDeckSize;
	private String choosedColor;
	private UnoPlayerID ownerID;
	private int remainingCards;
	
	/**
	 * 
	 * @param id
	 * @param ownerID
	 * @param cardPlayed
	 * @param actualDeckSize
	 * @param remainingCards TODO
	 */
	public UnoPlay( int id, UnoPlayerID ownerID, String cardPlayed, int actualDeckSize, int remainingCards){
		this.cardPlayed = cardPlayed;
		this.actualDeckSize = actualDeckSize;
		this.ownerID = ownerID;
		this.Id = id;	
		this.remainingCards = remainingCards;
	}
	
	/**
	 * Serve quando si gioca una carta cambia colore o un +4
	 * @param id
	 * @param ownerID
	 * @param cardPlayed
	 * @param actualDeckSize
	 * @param choosedColor
	 * @param remainingCards TODO
	 */
	public UnoPlay(int id, UnoPlayerID ownerID, String cardPlayed, int actualDeckSize, String choosedColor, int remainingCards ) {	
		this.choosedColor = choosedColor;
		this.cardPlayed = cardPlayed;
		this.actualDeckSize = actualDeckSize;
		this.ownerID = ownerID;
		this.Id = id;
		this.remainingCards = remainingCards;
	}
	
	public int getID() { 
		return this.Id; 
	}

	public String getCardPlayed() {
		return cardPlayed;
	}

	public int getActualDeckSize() {
		return actualDeckSize;
	}

	public String getChoosedColor() {
		return choosedColor;
	}

	public UnoPlayerID getOwnerId() {
		return ownerID;
	}

	public int getRemainingCards() {
		return remainingCards;
	}
	
}
